//此文件作为所有组件的入口文件
import Row from "@element/Row/index.js"; //快捷路径有问题,直接指定文件路径
import Col from "@element/Col/index.js";
import Container from "@element/Container/index.js";
import Main from "@element/main/index.js";
import Header from "@element/header/index.js";
import Footer from "@element/footer/index.js";
import Aside from "@element/aside/index.js";
import Icon from "@element/Icon/index.js";
import Button from "@element/button/index.js";

//存储所有组件的集合
const components = [Row, Col, Container, Main, Header, Footer, Aside, Icon, Button];

//注册所有组件并提供install方法
const install = (Vue) => {
  components.forEach((component) => {
    Vue.component(component["name"], component);
  });
};

//默认全部导出

export default {
  install,
  Row,
  Col,
  Container,
  Main,
  Header,
  Footer,
  Aside,
  Icon,
};

//外界可以通过{xx,xxx} from 'Element'按需导出
export { install, Row, Col, Container, Main, Header, Footer, Aside, Icon, Button };
